Create Codex Plugin - #5582
Conversation
1c9cb7d to
60304b2
Compare
There was a problem hiding this comment.
I'm afraid these will get out of sync with these: https://github.com/clockworklabs/SpacetimeDB/tree/master/skills
Is there any way we could symlink those rather than copy them?
There was a problem hiding this comment.
I have added a script to check skills sync (codex-plugin/scripts/check-skills-sync.ts) that fails when these get out of sync and resyncs with --fix. Unfortunately symlinks don't work, the installer doesn't follow them so the skills end up empty after installing.
| use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; | ||
|
|
||
| pub fn cli() -> clap::Command { | ||
| clap::Command::new("mcp") |
There was a problem hiding this comment.
I'm confused about why we have a separate mcp command? Is the idea that users may want to just serve the MCP server without starting up a local version of SpacetimeDB?
There was a problem hiding this comment.
Agents launch MCP servers over stdio, so spacetime mcp just bridges that to the HTTP endpoint, reusing the CLI's saved settings, which lets the plugin ship one config with no URL or token in it. It works against any SpacetimeDB instance the CLI is configured for, not just a local one.
cloutiertyler
left a comment
There was a problem hiding this comment.
I'd like to just ask a few questions about this PR with you.
Description of Changes
Add SpacetimeDB Codex plugin at
codex-plugin/with agent skills (incl. MCP skill) and MCP server config. Also introduce additions to the MCP server to support the config:spacetime mcpCLI subcommand which is a stdio to HTTP bridge for the MCP route, since local agents launch MCP servers over stdioPOST /v1/mcpMCP route with inherited auth which takes database as a tool argument, so the command needs no per user config (database name or identity) passed in, which simplifies users' MCP server config setupThe plugin's MCP server config:
{ "mcpServers": { "spacetimedb": { "command": "spacetime", "args": ["mcp"] } } }Plugin usage:
API and ABI breaking changes
None.
Expected complexity level and risk
2
Testing